<!-- 子组件 -->
<template>
    <div>
        <h3>---Child---</h3>
        <input :checked="checked" @change="changeFn" type="checkbox">
        <hr>
        <Son></Son>
    </div>
</template>

<script>
import Son from "@/components/Son.vue";

export default {
    name: "Child",
    components: {
        Son
    },
    props: {
        checked: Boolean // 注意
    },
    model:{
        prop:"checked",
        event:"change"
    },
    methods: {
        changeFn(){
            this.$emit("change",event.target.checked)
        }
    }

}
</script>